-- zerg
-- created by zhuangsl
-- 召唤兽：虫族生物

return {
    fetchInitData = function(classId)
        -- 获取虫族女王冈布奥的专属技能等级
        local prop = PropM.combine(ME.user, "incubation", 67);
        local level = PropM.apply(prop, 0);

        -- 触发特技发动事件
        EventMgr.fire(event.SPECIAL_SKILL_TRIGGER, { propId = prop[1] })

        local maxHp = ME.user:queryAttrib("max_hp");
        local attack = ME.user:queryAttrib("attack");

        local hpCoef = 250;
        local attackCoef = 250;

        if level >= 1 then
            hpCoef = hpCoef + 250;
        end
        if level >= 2 then
            attackCoef = attackCoef + 250;
        end
        if level >= 3 then
            hpCoef = hpCoef + 250;
        end
        if level >= 4 then
            attackCoef = attackCoef + 250;
        end

        maxHp = math.modf(maxHp * hpCoef / 1000);
        attack = math.modf(attack * attackCoef / 1000);

        maxHp = math.max(maxHp, 1);
        attack = math.max(attack, 1);

        return {
            ["hp"] = maxHp,
            ["max_hp"] = maxHp,
            ["attack"] = attack,
        };
    end,
};
